home *** CD-ROM | disk | FTP | other *** search
/ Remix Doll 3: Dirty Sally / Remix Doll 3: Dirty Sally.iso / drtyslly.exe / SHARED.DXR / 04969_errorUtil.ls < prev    next >
Encoding:
Text File  |  1995-02-11  |  1.7 KB  |  69 lines

  1. on errorAlert vMess, vErrorID
  2.   if integerp(vErrorID) then
  3.     set aAlertMess to vMess & RETURN & RETURN & "ID = " & vErrorID
  4.   else
  5.     set aAlertMess to vMess
  6.   end if
  7.   alert(aAlertMess)
  8. end
  9.  
  10. on reportFileErr vErr
  11.   if vErr <> 0 then
  12.     set aErrMess to gtFileErrMess(vErr)
  13.     errorAlert(aErrMess, vErr)
  14.   end if
  15. end
  16.  
  17. on gtFileErrMess vErr
  18.   if vErr = 0 then
  19.     set aErr to EMPTY
  20.   else
  21.     if vErr = -33 then
  22.       set aErr to "File directory full"
  23.     else
  24.       if vErr = -34 then
  25.         set aErr to "Volume full"
  26.       else
  27.         if vErr = -35 then
  28.           set aErr to "Volume not found"
  29.         else
  30.           if vErr = -36 then
  31.             set aErr to "I/O Error"
  32.           else
  33.             if vErr = -37 then
  34.               set aErr to "Bad file name"
  35.             else
  36.               if vErr = -38 then
  37.                 set aErr to "File not open"
  38.               else
  39.                 if vErr = -42 then
  40.                   set aErr to "Too many files open"
  41.                 else
  42.                   if vErr = -43 then
  43.                     set aErr to "File not found"
  44.                   else
  45.                     if vErr = -56 then
  46.                       set aErr to "No such drive"
  47.                     else
  48.                       if vErr = -65 then
  49.                         set aErr to "No disk in drive"
  50.                       else
  51.                         if vErr = -120 then
  52.                           set aErr to "Directory not found"
  53.                         else
  54.                           set aErr to "Unknown file error"
  55.                         end if
  56.                       end if
  57.                     end if
  58.                   end if
  59.                 end if
  60.               end if
  61.             end if
  62.           end if
  63.         end if
  64.       end if
  65.     end if
  66.   end if
  67.   return aErr
  68. end
  69.